<template>
  <div class="data-visualization">
    <div class="back">
      <el-button type="primary" @click="forwardTo">查看代码</el-button>
      <el-button @click="goback">返回</el-button>
    </div>
    <div id="data-view">
      <dv-full-screen-container>
        <top-header />
        <div class="main-content">
          <digital-flop />
          <div class="block-left-right-content">
            <ranking-board />
            <div class="block-top-bottom-content">
              <div class="block-top-content">
                <rose-chart />
                <water-level-chart />
                <scroll-board />
              </div>
              <cards />
            </div>
          </div>
        </div>
      </dv-full-screen-container>
    </div>
  </div>
</template>

<script>
import topHeader from './datav-components/topHeader'
import digitalFlop from './datav-components/digitalFlop'
import rankingBoard from './datav-components/rankingBoard'
import roseChart from './datav-components/roseChart'
import waterLevelChart from './datav-components/waterLevelChart'
import scrollBoard from './datav-components/scrollBoard'
import cards from './datav-components/cards'

export default {
  name: 'DataView',
  components: {
    topHeader,
    digitalFlop,
    rankingBoard,
    roseChart,
    waterLevelChart,
    scrollBoard,
    cards
  },
  data () {
    return {}
  },
  methods: {
    forwardTo() {
      this.$router.push('/data-visualization-code')
    },
    goback() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less">
.back {
  position: fixed;
  right: 30px;
  top: 30px;
  z-index: 1200;
}
#data-view {
  width: 100%;
  height: 100%;
  background-color: #030409;
  color: #fff;

  #dv-full-screen-container {
    background-color: #070a17;
    background-size: 100% 100%;
    box-shadow: 0 0 3px blue;
    display: flex;
    flex-direction: column;
  }

  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .block-left-right-content {
    flex: 1;
    display: flex;
    margin-top: 20px;
  }

  .block-top-bottom-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding-left: 20px;
  }

  .block-top-content {
    height: 55%;
    display: flex;
    flex-grow: 0;
    box-sizing: border-box;
    padding-bottom: 20px;
  }

}
</style>
